home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / wnos5src.zip / BBS.H < prev    next >
Text File  |  1993-09-19  |  2KB  |  98 lines

  1. /* @(#) $Header: bbs.h,v WNOS_1.2 92/11/06 12:04:13 deyke Exp $ */
  2. #ifndef _BBS_H
  3. #define _BBS_H
  4.  
  5. #ifndef _GLOBAL_H
  6. #include "global.h"
  7. #endif
  8.  
  9. #define LEN_BID         13
  10. #define LEN_SUBJECT     50
  11. #define LEN                40
  12.  
  13. #define NORMAL        0
  14. #define DELETED        1
  15. #define PRIVATE        2
  16. #define NEWS        4
  17. #define BULLETIN    8
  18.  
  19. struct userinfo {
  20.   char name[30];                /* name of user */
  21.   char mybbs[30];                 /* home mailbox */
  22.   int32 time;                    /* last time logged in */
  23.   int32 seq;                    /* last msg listed */
  24. };
  25.  
  26. struct user {
  27.   struct userinfo *info;
  28.   int s;                        /* socket index */
  29.   char *name;                   /* login name of user */
  30.   char errors;                    /* error count */
  31.   char level;                    /* user level */
  32. #define USER            0
  33. #define BOX                1
  34. #define ROOT            2
  35. #define CLOSED            4
  36.   int sid;                      /* System IDentifier for forward */
  37. #define    MBX_SID              0x01    /* Got any SID */
  38. #define    MBX_RLI_SID          0x02    /* This is an RLI BBS, disconnect after F> */
  39. #define MBX_HIER_SID      0x04    /* The BBS supports "hierarchical routing */
  40.                                 /* designators." */
  41. #define MBX_MID_SID          0x08    /* The BBS supports Message IDs on P mail */
  42.                                 /* Space here for others, currently not of */
  43.                                 /* interest to us. */
  44.   char *line;                    /* input line pointer */
  45. };
  46. #define NULLUSER (struct user *)0
  47.  
  48. struct index {
  49.   int32 size;
  50.   int32 date;
  51.   int32 mesg;
  52.   char lifetime_h;
  53.   char lifetime_l;
  54.   char flag;
  55.   char bid[LEN_BID];
  56.   char subject[LEN_SUBJECT];
  57.   char to[LEN];
  58.   char at[LEN];
  59.   char from[LEN];
  60.   char from_at[LEN];
  61. };
  62.  
  63. struct strlist {
  64.   struct strlist *next;
  65.   char *str;
  66. };
  67.  
  68. struct mail {
  69.   char from[LEN];
  70.   char from_at[LEN];
  71.   char to[LEN+LEN];
  72.   char subject[LEN_SUBJECT];
  73.   char bid[LEN_BID];
  74.   char mid[LEN_BID+10];
  75.   char newsgroup[LINELEN];
  76.   char flag;
  77.   int32 date;
  78.   int lifetime;
  79.   struct strlist *head;
  80.   struct strlist *tail;
  81. };
  82.  
  83. struct dir_entry {
  84.   struct dir_entry *left, *right;
  85.   int count;
  86.   char to[LEN];
  87. };
  88.  
  89. int dombbs __ARGS((int argc,char **argv,void *p));
  90. int recv_from_mail_or_news __ARGS((FILE *data,char *from, char *to));
  91.  
  92. /* used for ax25 store&forward */
  93. int dofnic __ARGS((int argc,char **argv,void *p));
  94. int dofinfo __ARGS((int argc,char **argv,void *p));
  95. int dofkick __ARGS((int argc,char **argv,void *p));
  96.  
  97. #endif /* _BBS_H */
  98.